package service

import (
	"context"
	"home-butler/internal/model"
)

type (
	IProductTopic interface {
		ListProductTopic(ctx context.Context, req *model.ProductTopicListReq) (res []*model.ProductTopicPageRes, err error)
		CreateProductTopic(ctx context.Context, req *model.ProductTopicReq) (res *model.ProductTopicRes, err error)
		UpdateProductTopic(ctx context.Context, req *model.ProductTopicUpdateReq) (res *model.ProductTopicRes, err error)
		DelProductTopic(ctx context.Context, req *model.ProductTopicDelReq) (res *model.ProductTopicRes, err error)
	}
)

var (
	localProductTopic IProductTopic
)

func ProductTopic() IProductTopic {
	if localProductTopic == nil {
		panic("implement not found for interface IProductTopic, forgot register?")
	}
	return localProductTopic
}

func RegisterProductTopic(i IProductTopic) {
	localProductTopic = i
}
